﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Mogre;

namespace WastedMechanics.CharState
{
    class CharStateDie : CharStateSimpleAction
    {        
        public CharStateDie(Character chr)
            : base(chr)
        {
            ActionTime = 0.9f;            
            AnimationName = "Die";
        }

        public override void Enter()
        {
            Character.SetAnimation(AnimationName);
            Character.Velocity = Vector3.ZERO;
            Character.CanTurn = true;
            Character.RunAcceleration = 0;

            Character.Profile.SoundDieFx.PlayNewInstance()
                .SetPosition(Character.Position);
            base.Enter();
        }

        public override void ActionPerform()
        {                   
        }

        public override CharState GetNextState()
        {
            return new CharStateDead(Character);
        }         
    }
}

